﻿//-----------------------------------------------------------------------------------------------------------
// Wbfs Engine (WBFSe) Project by Omega Frost 
// http://wbfse.codeplex.com/
//
// WBFSe is Licensed under the terms of the 
// Microsoft Reciprocal License (Ms-RL)
//-----------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WBFSe.Attributes;
using System.IO;

namespace WBFSe.IO
{
    /// <summary>
    /// Representation of a drive
    /// </summary>
    public interface IWbfsDriveInfo
    {
        /// <summary>
        /// The drive name in format X:\
        /// </summary>
        String Name { get; }

        /// <summary>
        /// The drive label
        /// </summary>
        String Label { get; set; }

        /// <summary>
        /// The drive FS
        /// </summary>
        String FileSystem { get; }

        /// <summary>
        /// The drive type
        /// </summary>
        DriveType Type { get; }

        /// <summary>
        /// The partition is WBFS
        /// </summary>
        bool IsWbfs { get; }

        /// <summary>
        /// The drive is marked as a WbfsFat
        /// </summary>
        bool IsWbfsFat { get; set; }

        /// <summary>
        /// The file system supports sparse file
        /// </summary>
        bool IsSparse { get; }

        /// <summary>
        /// The drive is accessible
        /// </summary>
        bool IsReady { get; }

        /// <summary>
        /// The size of the drive
        /// </summary>
        long Size { get; }

        /// <summary>
        /// The ammount of free user space
        /// </summary>
        long Free { get; }

        /// <summary>
        /// The ammount of used user space
        /// </summary>
        long Used { get; }

        /// <summary>
        /// Updates the drive
        /// </summary>
        void Update();

        /// <summary>
        /// Closes the drive
        /// </summary>
        void Close();

        /// <summary>
        /// Enumerates files in a directory of the drive
        /// </summary>
        /// <param name="path">The full path</param>
        /// <returns>The filenames</returns>
        /// <exception cref="System.ArgumentException">The path is invalid or the root mismath</exception>
        /// <exception cref="System.Exception">On operation failure</exception>
        String[] GetFilenames(String path);
    }
}
